package com.fqgj.sentry.controller.mc;

import com.fqgj.sentry.common.response.ApiOutput;
import com.fqgj.sentry.biz.mc.PermissionBusiness;
import com.fqgj.sentry.biz.mc.vo.role.MenuPermissionInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * Created by liupengpeng on 2017/7/14.
 */
@RestController
@RequestMapping("/permission")
public class PermissionController {

    @Autowired
    private PermissionBusiness permissionBusiness;

    /**
     * 查询菜单权限层级关系
     *
     * @return
     */
    @RequestMapping(value = "/menu/list", method = RequestMethod.POST)
    public ApiOutput findMenuPermissionInfo() {
        List<MenuPermissionInfo> menuPermissionInfoList = permissionBusiness.findMenuPermissionInfo();
        return new ApiOutput<>("list", menuPermissionInfoList);
    }


}
